<template>
    <div class="container mhp-wrap wrapper" ref="wrapper1">
        <div class="content">
            <MainHomeSwiper></MainHomeSwiper>
			<MainHomeClassification></MainHomeClassification>
			<MainHomeBoon></MainHomeBoon>
			<MainHomeHotType></MainHomeHotType>
			<MainHomeGuessYourLike></MainHomeGuessYourLike>
        </div>  
    </div>
</template>

<script>
import Bscroll from "better-scroll";

//载入组件
import MainHomeSwiper from "./MainHomeSwiper"
import MainHomeClassification from "./MainHomeClassification"
import MainHomeBoon from "./MainHomeBoon"
import MainHomeHotType from "./MainHomeHotType"
import MainHomeGuessYourLike from "./MainHomeGuessYourLike"


export default {
	components: {
		MainHomeSwiper,
		MainHomeClassification,
		MainHomeBoon,
		MainHomeHotType,
		MainHomeGuessYourLike
	},
	mounted() {
		this.bscrollInit();
	},
	methods: {
		bscrollInit() {
			this.$nextTick(() => {
				if (!this.scroll) {
					this.scroll = new Bscroll(this.$refs.wrapper1, {
						click:true
					});
				} else {
					this.scroll.refresh();
				}
			});
		}
	}
};
</script>

<style lang="less">
.mhp-wrap {
  position: absolute;
  top: 0.8rem;
  bottom: 0.8rem;
  background-color: #eee;
}
</style>